package com.zbest.zpay.exchange.dal.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zbest.zpay.exchange.dal.model.FluxInfoDO;

/**
 * Created by wenfeihu on 16/5/20.
 */
public interface FluxInfoMapper {

    public int insert(FluxInfoDO fluxInfoDO);

    public int updateStatus(@Param("fluxId") String fluxId, @Param("destStatus") String destStatus,
                            @Param("srcStatus") String srcStatus,
                            @Param("gmtModified") Date gmtModified);

    public int updateResponseAndStatus(@Param("fluxId") String fluxId,
                                       @Param("respCode") String respCode,
                                       @Param("respMessage") String respMessage,
                                       @Param("instRespCode") String instRespCode,
                                       @Param("instRespMessage") String instRespMessage,
                                       @Param("destStatus") String destStatus,
                                       @Param("srcStatus") String srcStatus,
                                       @Param("gmtModified") Date gmtModified);

    public FluxInfoDO query(@Param("fluxId") String fluxId);

    public List<FluxInfoDO> queryByChannelStatus(@Param("channelId") String channelId,
                                                 @Param("status") String status,
                                                 @Param("beginDate") Date beginDate,
                                                 @Param("endDate") Date endDate);

    public FluxInfoDO queryBySerialNo(@Param("instSerialNo") String instSerialNo,
                                      @Param("channelId") String channelId);

}
